package com.xunk.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xunk.common.core.annotation.Excel;
import com.xunk.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 设备对象 sys_device
 * 
 * @author ruoyi
 * @date 2021-03-17
 */
public class SysDevice extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long deviceId;

    /** 设备编号 */
    @Excel(name = "设备编号")
    private String deviceSn;

    /** 设备名称 */
    @Excel(name = "设备名称")
    private String deviceName;

    @Excel(name = "设备昵称")
    private String deviceNickname;

    /** 设备类型名称, 如猫眼、窗帘、分集水器 */
    @Excel(name = "设备类型名称, 如猫眼、窗帘、分集水器")
    private String deviceType;

    private String deviceTypeName;

    /** 家庭id/社区园区id */
    @Excel(name = "家庭id/社区园区id")
    private Long deptId;

    /** 房间号 */
    @Excel(name = "房间号")
    private String roomNum;

    /** 分组id */
    @Excel(name = "分组id")
    private Long groupId;

    /** 设备源 0 家庭设备 1 非家庭设备 */
    @Excel(name = "设备来源",readConverterExp=" 0=家庭设备,1=机电设备")
    private Integer deviceSource;

    /** 1 网关 2 网关子设备 3 wifi */
    @Excel(name = "设备类型",readConverterExp=" 1=网关,2=网关子设备,3=Wifi设备")
    private Integer deviceCategory;

    /** 设备品牌 */
    @Excel(name = "设备品牌")
    private String brand;

    /** 规格型号 */
    @Excel(name = "规格型号")
    private String specModel;

    /** 厂商 */
    @Excel(name = "厂商")
    private String manufacturer;

    /** 厂商编号 */
    @Excel(name = "厂商编号")
    private String manufacturerNo;

    /** 供应商 ruying、mandun*/
    @Excel(name = "供应商")
    private String supplier;

    /** 生产时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "生产时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date productTime;

    /** 保修期开始时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保修期开始时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date maintainStarttime;

    /** 保修期结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "保修期结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date maintainEndtime;

    /** 设备描述 */
    @Excel(name = "设备描述")
    private String deviceDescription;

    /** IMEI */
    @Excel(name = "IMEI")
    private String imei;

    /** 1在线/0离线，默认离线 */
    @Excel(name = "设备在线状态",readConverterExp=" 1=在线,0=离线")
    private Long deviceOnline;

    /** 在线数据 */
    @Excel(name = "在线数据")
    private String ontimeData;

    /** 设备状态，是否已被删除，1 是 0 否 */
    private String deviceStatus;

    /** 区域名称 */
    @Excel(name = "区域名称")
    private String regionName;

    /** BIM编号 */
    private String bimNo;

    /** 经度 */
    @Excel(name = "经度")
    private String longitude;

    /** 纬度 */
    @Excel(name = "纬度")
    private String latitude;

    /** 采购时间 */
    private Date purchaseTime;

    /** 采购价格 */
    private Long purchasePrice;

    /** 维保单位 */
    @Excel(name = "维保单位")
    private String maintainCompany;

    /** 区域id */
    private Long regionId;

    /** 建筑物id */
    private Long buildingId;

    /** 楼层 */
    private Long floor;

    /** 设备数据子系统  1* 火 2* 水  3* 电  4*通道 */
    private Integer subSystemType;

    /**
     * 绑定设备时需要的token
     */
    private String deviceToken;

    private Long deviceBaseId;

    @Excel(name = "所属产品")
    private String baseType;
    /**
     * 设备点位
     */
    private String pointLocation;
    /**
     * 设备最近一次上线时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "设备最近一次上线时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date onlineChangeTime;

    public Date getOnlineChangeTime() {
        return onlineChangeTime;
    }

    public void setOnlineChangeTime(Date onlineChangeTime) {
        this.onlineChangeTime = onlineChangeTime;
    }

    public String getBaseType() {
        return baseType;
    }

    public void setBaseType(String baseType) {
        this.baseType = baseType;
    }

    public String getDeviceTypeName() {
        return deviceTypeName;
    }

    public void setDeviceTypeName(String deviceTypeName) {
        this.deviceTypeName = deviceTypeName;
    }

    public String getPointLocation() {
        return pointLocation;
    }

    public void setPointLocation(String pointLocation) {
        this.pointLocation = pointLocation;
    }

    public Long getDeviceBaseId() {
        return deviceBaseId;
    }

    public void setDeviceBaseId(Long deviceBaseId) {
        this.deviceBaseId = deviceBaseId;
    }

    public String getDeviceNickname() {
        return deviceNickname;
    }

    public void setDeviceNickname(String deviceNickname) {
        this.deviceNickname = deviceNickname;
    }

    public String getDeviceToken() {
        return deviceToken;
    }

    public void setDeviceToken(String deviceToken) {
        this.deviceToken = deviceToken;
    }

    public void setDeviceId(Long deviceId)
    {
        this.deviceId = deviceId;
    }

    public Long getDeviceId() 
    {
        return deviceId;
    }
    public void setDeviceSn(String deviceSn) 
    {
        this.deviceSn = deviceSn;
    }

    public String getDeviceSn() 
    {
        return deviceSn;
    }
    public void setDeviceName(String deviceName) 
    {
        this.deviceName = deviceName;
    }

    public String getDeviceName() 
    {
        return deviceName;
    }
    public void setDeviceType(String deviceType) 
    {
        this.deviceType = deviceType;
    }

    public String getDeviceType() 
    {
        return deviceType;
    }
    public void setDeptId(Long deptId) 
    {
        this.deptId = deptId;
    }

    public Long getDeptId() 
    {
        return deptId;
    }
    public void setRoomNum(String roomNum) 
    {
        this.roomNum = roomNum;
    }

    public String getRoomNum() 
    {
        return roomNum;
    }
    public void setGroupId(Long groupId) 
    {
        this.groupId = groupId;
    }

    public Long getGroupId() 
    {
        return groupId;
    }
    public void setDeviceSource(Integer deviceSource) 
    {
        this.deviceSource = deviceSource;
    }

    public Integer getDeviceSource() 
    {
        return deviceSource;
    }
    public void setDeviceCategory(Integer deviceCategory) 
    {
        this.deviceCategory = deviceCategory;
    }

    public Integer getDeviceCategory() 
    {
        return deviceCategory;
    }
    public void setBrand(String brand) 
    {
        this.brand = brand;
    }

    public String getBrand() 
    {
        return brand;
    }
    public void setSpecModel(String specModel) 
    {
        this.specModel = specModel;
    }

    public String getSpecModel() 
    {
        return specModel;
    }
    public void setManufacturer(String manufacturer) 
    {
        this.manufacturer = manufacturer;
    }

    public String getManufacturer() 
    {
        return manufacturer;
    }
    public void setManufacturerNo(String manufacturerNo) 
    {
        this.manufacturerNo = manufacturerNo;
    }

    public String getManufacturerNo() 
    {
        return manufacturerNo;
    }
    public void setSupplier(String supplier) 
    {
        this.supplier = supplier;
    }

    public String getSupplier() 
    {
        return supplier;
    }
    public void setProductTime(Date productTime) 
    {
        this.productTime = productTime;
    }

    public Date getProductTime() 
    {
        return productTime;
    }
    public void setMaintainStarttime(Date maintainStarttime) 
    {
        this.maintainStarttime = maintainStarttime;
    }

    public Date getMaintainStarttime() 
    {
        return maintainStarttime;
    }
    public void setMaintainEndtime(Date maintainEndtime) 
    {
        this.maintainEndtime = maintainEndtime;
    }

    public Date getMaintainEndtime() 
    {
        return maintainEndtime;
    }
    public void setDeviceDescription(String deviceDescription) 
    {
        this.deviceDescription = deviceDescription;
    }

    public String getDeviceDescription() 
    {
        return deviceDescription;
    }
    public void setImei(String imei) 
    {
        this.imei = imei;
    }

    public String getImei() 
    {
        return imei;
    }
    public void setDeviceOnline(Long deviceOnline) 
    {
        this.deviceOnline = deviceOnline;
    }

    public Long getDeviceOnline() 
    {
        return deviceOnline;
    }
    public void setOntimeData(String ontimeData) 
    {
        this.ontimeData = ontimeData;
    }

    public String getOntimeData() 
    {
        return ontimeData;
    }
    public void setDeviceStatus(String deviceStatus) 
    {
        this.deviceStatus = deviceStatus;
    }

    public String getDeviceStatus() 
    {
        return deviceStatus;
    }
    public void setRegionName(String regionName) 
    {
        this.regionName = regionName;
    }

    public String getRegionName() 
    {
        return regionName;
    }
    public void setBimNo(String bimNo) 
    {
        this.bimNo = bimNo;
    }

    public String getBimNo() 
    {
        return bimNo;
    }
    public void setLongitude(String longitude) 
    {
        this.longitude = longitude;
    }

    public String getLongitude() 
    {
        return longitude;
    }
    public void setLatitude(String latitude) 
    {
        this.latitude = latitude;
    }

    public String getLatitude() 
    {
        return latitude;
    }
    public void setPurchaseTime(Date purchaseTime) 
    {
        this.purchaseTime = purchaseTime;
    }

    public Date getPurchaseTime() 
    {
        return purchaseTime;
    }
    public void setPurchasePrice(Long purchasePrice) 
    {
        this.purchasePrice = purchasePrice;
    }

    public Long getPurchasePrice() 
    {
        return purchasePrice;
    }
    public void setMaintainCompany(String maintainCompany) 
    {
        this.maintainCompany = maintainCompany;
    }

    public String getMaintainCompany() 
    {
        return maintainCompany;
    }
    public void setRegionId(Long regionId) 
    {
        this.regionId = regionId;
    }

    public Long getRegionId() 
    {
        return regionId;
    }
    public void setBuildingId(Long buildingId) 
    {
        this.buildingId = buildingId;
    }

    public Long getBuildingId() 
    {
        return buildingId;
    }
    public void setFloor(Long floor) 
    {
        this.floor = floor;
    }

    public Long getFloor() 
    {
        return floor;
    }
    public void setSubSystemType(Integer subSystemType) 
    {
        this.subSystemType = subSystemType;
    }

    public Integer getSubSystemType() 
    {
        return subSystemType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("deviceId", getDeviceId())
            .append("deviceSn", getDeviceSn())
            .append("deviceName", getDeviceName())
            .append("deviceType", getDeviceType())
            .append("deptId", getDeptId())
            .append("roomNum", getRoomNum())
            .append("groupId", getGroupId())
            .append("deviceSource", getDeviceSource())
            .append("deviceCategory", getDeviceCategory())
            .append("brand", getBrand())
            .append("specModel", getSpecModel())
            .append("manufacturer", getManufacturer())
            .append("manufacturerNo", getManufacturerNo())
            .append("supplier", getSupplier())
            .append("productTime", getProductTime())
            .append("maintainStarttime", getMaintainStarttime())
            .append("maintainEndtime", getMaintainEndtime())
            .append("createTime", getCreateTime())
            .append("deviceDescription", getDeviceDescription())
            .append("createBy", getCreateBy())
            .append("imei", getImei())
            .append("deviceOnline", getDeviceOnline())
            .append("ontimeData", getOntimeData())
            .append("deviceStatus", getDeviceStatus())
            .append("regionName", getRegionName())
            .append("bimNo", getBimNo())
            .append("longitude", getLongitude())
            .append("latitude", getLatitude())
            .append("purchaseTime", getPurchaseTime())
            .append("purchasePrice", getPurchasePrice())
            .append("maintainCompany", getMaintainCompany())
            .append("regionId", getRegionId())
            .append("buildingId", getBuildingId())
            .append("floor", getFloor())
            .append("subSystemType", getSubSystemType())
            .toString();
    }
}
